package com.lyj.mall.service;

import com.lyj.mall.form.Cart;
import com.lyj.mall.form.CartAddForm;
import com.lyj.mall.form.CartUpdateForm;
import com.lyj.mall.vo.CartVo;
import com.lyj.mall.vo.ResponseVo;

import java.util.List;

/**
 * @author lyj
 * @date 2020/1/17 15:25
 */
public interface CartService {

    ResponseVo<CartVo> add(Integer uid, CartAddForm cartAddForm);

    ResponseVo<CartVo> list(Integer uid);

    ResponseVo<CartVo> update(Integer uid, Integer productId, CartUpdateForm cartUpdateForm);

    ResponseVo<CartVo> delete(Integer uid, Integer productId);
    // 选中全部
    ResponseVo<CartVo> selectAll(Integer uid);
    // 全不选中
    ResponseVo<CartVo> unSelectAll(Integer uid);

    ResponseVo<Integer> sum(Integer uid);

    List<Cart> listForCart(Integer uid);
}
